package day04;

public class PersonS {

		String name;
		int age;
		public PersonS(String name,int age){
			this.name=name;
			this.age=age;
					
		}
		
		public String toString(){
			return "("+name+","+age+")";
		}
	
	
		public boolean equals(Object anobject){
			if(anobject==null) return false;
			if(this==anobject) return true;
			if(anobject instanceof PersonS){
				PersonS p=(PersonS)anobject;
				if(p.name.equals(this.name)&&p.age==this.age)
					return true;
				return false;
				
			}
			return false;
			
		}
	
}
